package com.qys.training.server.controller;

import com.qys.training.base.dto.BaseResult;
import com.qys.training.biz.alive.service.AliveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Winstone
 * @date 2020/8/5 - 10:00 下午
 */
@RestController
@RequestMapping("/alive")
public class AliveController {
    @Autowired
    AliveService aliveService;

    @GetMapping("/get")
    public @ResponseBody
    BaseResult getAliveServerInfo() {
        return BaseResult.success(aliveService.getTopic());
    }
}
